<template>
     
  <div id="recommend">
    <div :key="index" v-for="(item, index) in recommend" class="recommend_item">
      <a :href="item.link">
        <img :src="item.image" alt="" />
      </a>
      <div class="text">{{ item.title }}</div>
    </div>
  </div>
</template>

<script>
export default {
  // 组件名称
  name: "homerecommend", // 组件参数 接收来自父组件的数据
  props: {
    recommend: {
      type: Array,
      default() {
        return [];
      },
    },
  }, // 局部注册的组件
  components: {}, // 组件状态值
  data() {
    return {};
  },
};
</script>
<style scoped>
#recommend {
  display: flex;
  justify-content: space-around;
  padding: 20px 0 20px;
  border-bottom: 10px solid #eee;
}
.recommend_item img {
  width: 85px;
  height: 85px;
  margin-bottom: 8px;
}
.recommend_item .text {
  font-size: 16px;
  margin-left: 8px;
}
</style>